package com.yin.myproject.arithmetic;

/**
 * 基于链表实现树
 *
 * @author Eason
 * @create 2018-04-25 10:36
 **/
public class LinkedTree {

    static final class TreeNode<T> {
        TreeNode<T> parent;  // red-black tree links
        TreeNode<T> left;
        TreeNode<T> right;
        TreeNode<T> prev;

        public TreeNode(TreeNode<T> parent, TreeNode<T> left, TreeNode<T> right, TreeNode<T> prev) {
            this.parent = parent;
            this.left = left;
            this.right = right;
            this.prev = prev;
        }
    }
}
